package com.atguigu.spzx.manager.mapper;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName: SysRoleUserMapper
 * Package:
 * Description:
 *
 * @Author:xiaohei
 * @Create 2024/5/18 22:11
 * Version 1.0
 */
@Mapper
public interface SysRoleUserMapper {


    //1 根据userId删除用户之前分配角色数据
    void deleteByUserId(Long userId);

    //2 重新分配新数据
    void doAssign(Long userId, Long roleId);

    //根据userId查询用户分配过的角色的id列表
    List<Long> selectRoleIds(Long userId);
}
